﻿using System.Linq;
using System.Web.UI;
using Medianamik.Core;
using Telerik.Web.UI;

namespace Medianamik.UI.ConfigManagement.UserControls
{
    public partial class ModuleList : BaseModuleListUserControl
    {
        protected override void GridNeedDataSource(object source, GridNeedDataSourceEventArgs e)
        {
            moduleGrid.DataSource = ConfigManager.GetAll<MedianamikModule>(Page.CurrentUICulture)
                 .OrderBy(m => m.Position);
        }

        protected override RadGrid Grid
        {
            get { return moduleGrid; }
        }

        protected override UpdatePanel GridUpdatePanel
        {
            get { return mainUpdatePanel; }
        }

        protected override string ManagementURL
        {
            get { return "ModuleManagement.aspx"; }
        }
    }
}